<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateIndexMessageTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('index_message', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('notice')->comment('通知内容');
            $table->string('creator')->default('')->comment('创建者');
            $table->timestamp('exp_time')->nullable()->comment('取消展示时间');
            $table->integer('status')->default(0)->comment('展示状态');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('index_message');
    }
}
